<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>薪资想过万，代码敲三遍</title>
	<style>
		#myToast {
			width: 200px;
			height: 50px;
			background-color: pink;
			line-height: 50px;
			position: fixed;
			left: 50%;
			transform: translateX(-50%);
			text-align: center;
		}
	</style>
</head>

<body>
	<div id="myToast">我是提示</div>

	<script>
		// 创建轻提示对象
		const myToast = document.querySelector('#myToast')
		const toast = new bootstrap.Toast(myToast, { delay: 1000 })
		// 调用show方法
		toast.show()


	</script>
</body>

</html>